<template>
  <div class="flex">
    <el-card class="w-1/4 user" shadow="hover">
      <template #header>
        <div class="card-header">
          <span> {{ $t("personal.persönlicheInformationen") }}</span>
        </div>
      </template>
      <ProfileUser ref="profileuserchildren" />
    </el-card>
    <el-card class="w-3/4 user ml-3" shadow="hover">
      <template #header>
        <div class="card-header">
          <span>{{ $t("personal.GrundlegendeInformationen") }}</span>
        </div>
      </template>
      <div>
        <el-tabs
          v-model="activeName"
          tab-position="top"
          style="height: 400px"
          class="profile-tabs"
        >
          <el-tab-pane :label="$t('personal.Grundlegende')" name="basicInfo">
            <BasicInfo @fun="fun" />
          </el-tab-pane>
          <el-tab-pane :label="$t('personal.Passwortändern')" name="resetPwd">
            <ResetPwd />
          </el-tab-pane>
        </el-tabs>
      </div>
    </el-card>
  </div>
</template>
<script setup lang="ts">
defineOptions({
  name: "Personal",
  inheritAttrs: false,
});
import { BasicInfo, ProfileUser, ResetPwd } from "./components/";

const activeName = ref("basicInfo");
const profileuserchildren = ref();

function fun() {
  profileuserchildren.value.getprofileinfo();
}
</script>
<style scoped>
.user {
  max-height: 960px;
  padding: 15px 20px 20px;
}

.flex {
  margin: 20px;
}

.card-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

:deep(.el-card .el-card__header, .el-card .el-card__body) {
  padding: 15px !important;
  background-color: var(--el-bg-color-page);
}

.profile-tabs > .el-tabs__content {
  padding: 32px;
  color: #6b778c;
  font-weight: 600;
}

.el-tabs--left .el-tabs__content {
  height: 100%;
}
</style>
